import 'package:flutter/material.dart';
import 'choiceItem.dart';
//选项框部件,因为这里需要跳转到子页面，所以继承statefulwidget
class choiceContainer extends StatefulWidget{
  @override
  _choiceContainerState createState() {
    // TODO: implement createState
    return _choiceContainerState();
  }
}
//创建状态管理类
class _choiceContainerState extends State<choiceContainer>{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      margin: EdgeInsets.all(10),
      padding: EdgeInsets.only(left: 10,right: 10,bottom: 10),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(10)
      ),
      child: Table(
        children: [
          TableRow(
              children: [
                itemWidget(imgUrl: 'images/homet.png',title: "二手手机",),
                itemWidget(imgUrl: 'images/homet.png',title: "数码",),
                itemWidget(imgUrl: 'images/homet.png',title: "游戏交易",),
                itemWidget(imgUrl: 'images/homet.png',title: "母婴玩具",),
                itemWidget(imgUrl: 'images/homet.png',title: "家居家电",),
              ]
          ),
          TableRow(
              children: [
                itemWidget(imgUrl: 'images/homet.png',title: "服饰鞋包",),
                itemWidget(imgUrl: 'images/homet.png',title: "美妆捡漏",),
                itemWidget(imgUrl: 'images/homet.png',title: "二手车",),
                itemWidget(imgUrl: 'images/homet.png',title: "租衣服",),
                itemWidget(imgUrl: 'images/homet.png',title: "全部分类",),
              ]
          ),
        ],
      ),
    );
  }
}